/*
Copyright 2010  Murali Devi (profdevi@gmail.com)

This file is part of ComineGL Project.

ComineGL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ComineGL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ComineGL.  If not, see <http://www.gnu.org/licenses/>.

This code uses the irrlicht and irrklang libraries.  Please read
the libraries copyrights at 

	irrlicht library:  http://irrlicht.sourceforge.net
	irrklang library:  http://www.ambiera.com/irrklang

*/



//v1.2 copyright Comine.com 20101211S22
#ifndef MCGLSoundInfo_h
#define MCGLSoundInfo_h

///////////////////////////////////////////////////
#include "MIrrklang.h"
#include "MString.h"


//******************************************************
//**  MCGLSoundInfo class
//******************************************************
class MCGLSoundInfo
	{
	////////////////////////////////////////////////
	MString mFileName;					// File Name of file
	ISoundEngine *mDevice;				// Reference to sound
	ISound *mSound;
	
	////////////////////////////////////////////////
	void ClearObject(void);
	
	////////////////////////////////////////////////
	public:
	MCGLSoundInfo(void);
	~MCGLSoundInfo(void);
	bool Create(ISoundEngine *engine,const char *filename);	
	bool Destroy(void);
	bool Play(bool loop=false);
	bool Play3D(float x,float y,float z,bool loop=false);
	bool Stop(void);					// Stop the sound
	bool Continue(void);				// Continue the sound
	bool IsPaused(void);				// =true, if sound is stoped
	bool IsFinished(void);				// =true if sound is finished playing
	bool SetVolume(float volume);		// volume(0...1.0f)
	bool SetPan(float val);				// val(-1..0(Center).,+1)
	int GetPlayLength(void);			// =0(if unknown)
	int GetPlayPosition(void);			// Get Current Play Position
	const char *GetFileName(void);		// Get File Name of sound
	};

#endif // MCGLSoundInfo_h

